from selenium.webdriver.common.by import By


class  AdminAllNotificationLocator:
    # notification菜单
    notification_tab = (By.XPATH, "//div[contains(@data-menu-id,'MESSAGE')]")
    #all notification菜单
    all_notification_tab = (By.CSS_SELECTOR, '[path="/console/messageCenter/list"]')
    # Dashboard菜单
    dashboard_tab = (By.XPATH, "//div[contains(@data-menu-id,'DASHBOARD')]")
    # Bill菜单
    bill_tab = (By.XPATH, "//div[contains(@data-menu-id,'BILL')]")
    # Ticket菜单
    ticket_tab = (By.XPATH, "//div[contains(@data-menu-id,'TICKET')]")
    #Security Management菜单
    security_management_tab = (By.XPATH, "//div[contains(@data-menu-id,'SECURITY_MANAGEMENT_CST')]")
    #Approval菜单
    approval_tab = (By.XPATH, "//div[contains(@data-menu-id,'APPROVAL_PLT')]")

    #刷新按钮
    refresh_button = (By.XPATH,'//button[contains(@class,"antd4-btn-icon-only")]')
    #页面tab
    all_notification = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[1]')
    system = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[2]')
    product = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[3]')
    security = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[4]')
    promotion = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[5]')

    # 消息总数
    total_count = (By.XPATH, '//li[contains(@class,"antd4-pagination-total-text")]')

    # 右上角消息通知图标红点
    new_dot_in_icon = (By.XPATH, '//*[@id="root"]/section/div/div/div/div/div[2]/div[3]/span/sup')

    # 右上角消息通知new标签
    new_tag_in_icon = (By.XPATH, '/html/body/div[3]/div/div/ul/li/span/a/span')
    # 菜单新消息标签
    new_tag_in_menu = (By.XPATH, '//ul[contains(@id,"MESSAGE")]/li[3]/span/div/span[2]')
    # 列表新消息红点
    new_dot_in_list = (By.XPATH, "(//span[contains(@class,'antd4-badge-status-dot')])[1]")
    # 右上角消息通知图标
    message_icon = (By.XPATH, '//*[@id="root"]/section/div/div/div/div/div[2]/div[4]/span/span')
    message_icon = (By.CSS_SELECTOR,'[aria-label="bell"]')

    #列表已读按钮
    list_mark_as_read = (By.XPATH,'//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]/td[5]/div/div/div[2]/button')

    #列表删除按钮
    list_delete_button = (By.XPATH,'(//button[contains(@class,"table-operation-btnLine-bt")])[1]')
    #列表选中按钮，第一个
    list_select_first_button = (By.XPATH,'//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]/td[1]/label')

    #列表第一行
    list_first_record = (By.XPATH,'//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]')

    #mark as read按钮
    bottom_mark_as_read = (By.XPATH,'//*[@class="cre-page-content-filter-panel"]//*[text()="Mark As Read"]/..')

    #删除按钮
    bottom_delete = (By.XPATH,'(//*[@class="antd4-table-tbody"]//*[text()="Delete"]/..)[1]')

    #页面第一条站内信的标题
    first_message_title_button = (By.XPATH,'//*[@class="antd4-table-tbody"]/tr[2]/td[2]/button')

    #页面第一条站内信的标题的文案
    first_message_title = (By.XPATH,'//*[@class="antd4-table-tbody"]/tr[2]/td[2]/button/div')

    # 页面第二条站内信的标题
    second_message_title_button = (By.XPATH, '//*[@class="antd4-table-tbody"]/tr[3]/td[2]/button/div')

    #消息详情页弹框的标题
    message_detail_title = (By.XPATH,'//*[@class="antd4-modal-title"]//div[contains(@class,"titleContentFirst")]')

    #消息详情页关闭按扭
    close_message_detail = (By.XPATH,'//button[contains(@class,"antd4-modal-close")]')

    #删除确认按钮
    delete_confirm_button = (By.XPATH,'//button[contains(@class,"antd4-btn-primary")]')

    # 翻页按钮-下一个
    next_button = (By.XPATH, '(//button[contains(@class,"antd4-btn-circle")])[1]')

    # 翻页按钮-上一个
    previous_button = (By.XPATH, '(//button[contains(@class,"antd4-btn-circle")])[2]')
